#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll sieve_size = 1e8+10;
bitset<sieve_size> bs;
vector<int> primes;
void sieve() {
  bs.set();
  bs[0]=bs[1]=0;
  for(ll i=2; i<=sieve_size; ++i) {
    if(bs[i]) {
      for(ll j=i*i; j<=sieve_size; j+=i) {
        bs[j]=0;
      }
      primes.push_back(i);
    }
  }
}
/**
 * @brief prime factorize in O(sqrt(N)/ln(N)). Need to call sieve() first.
 * 
 * @param N 
 * @return vector<int> 
 */
vector<int> prime_factorize(ll N) {
  vector<int> factors;
  ll pf_idx = 0, pf = primes[pf_idx];
  while(pf*pf<=N) {
    while(N%pf==0) {N /= pf; factors.push_back(pf);}
    pf = primes[++pf_idx];
  }
  if(N!=1) {factors.push_back(N);}  // Cornor case: N itself is a prime
  return factors;
}

int main() {
  sieve();
  vector<int> factorized = prime_factorize(2880);
  for(auto el:factorized) {cout<<el<<' ';}
  cout<<endl;
}